//
//  UIBarButtonItem+Extensions.swift
//  SinaApp
//
//  Created by shui on 2018/3/28.
//  Copyright © 2018年 shui. All rights reserved.
//

import UIKit



extension UIBarButtonItem {
    
    
    /// 创建 UIBarButtonItem
    ///
    /// - Parameters:
    ///   - title:  title
    ///   - fontSize: fontSize,默认16号字体
    ///   - target: target
    ///   - action: action
    convenience  init(title : String,fontSize : CGFloat = 16,target:Any?,action: Selector) {
        let btn : UIButton = UIButton.cz_textButton(title, fontSize: fontSize, normalColor: UIColor.gray, highlightedColor: UIColor.orange)
        btn.addTarget(target, action:action, for: .touchUpInside)
        self.init(customView: btn)
        
    }
}
